package com.cskaoyan.controller.admin;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("admin/order")
public class OrderReplyController {
    @Autowired
    CommentService commentService;

    @PostMapping("reply")
    public BaseRespVo reply(@RequestBody Map map){
        Integer commentId = (Integer) map.get("commentId");
        String content = (String) map.get("content");
        commentService.updateContent(commentId , content);

        return BaseRespVo.ok();
    }
}
